package com.study.javaBasic.linklist;

/**
 * @ClassName: LinkListDemo
 * @Description: 链表
 * @author: 王胜
 * @date 2021/2/23
 * @Version: 1.0
 **/
public class LinkListDemo {
    public static void main(String[] args) {
        LinkList head=new LinkList();
        head.create(6,1);
        head.showAllNext();

        System.out.println("---------打印链表长度------------");
        System.out.println(head.size());
        System.out.println("---------打印链表倒数第index个值------------");
        System.out.println(head.lastIndex(-1));
        System.out.println("---------反转链表------------");
        head.reverse().showAllNext();
    }
}